import request from '@/utils/request'
import { faceApiUrl } from '../config'


// 总公司-成本计划看板-当期数据统计表
export function  getCurrentPeriodStatistics() {
    return request({
        url: faceApiUrl + '/headquartersBulletinBoard/completeNodeStatistics',
        method: 'get',
    })
}


//   总公司-成本计划看板-已完成节点数据统计表
export function getCompleteNodeStatistics() {
    return request({
        url: faceApiUrl + '/headquartersBulletinBoard/currentPeriodStatistics',
        method: 'get',
    })
}

// 总公司-成本计划看板-总成本折线对比图
export function getCostContrast(data) {
    return request({
        url: faceApiUrl + '/headquartersBulletinBoard/costContrast?type='+data.type,
        method: 'get',
    })
}

// 总公司-商务数据看板-通用看版
export function getCommonBulletinBoard() {
    return request({
        url: faceApiUrl + '/headquartersBulletinBoard/commonBulletinBoard',
        method: 'get',
    })
}

// 总公司-商务数据看板-土建看版
export function getCivilEngineeringBulletinBoard() {
    return request({
        url: faceApiUrl + '/headquartersBulletinBoard/civilEngineeringBulletinBoard',
        method: 'get',
    })
}
// 总公司-商务数据看板-安装看版
export function getInstallBulletinBoard() {
    return request({
        url: faceApiUrl + '/headquartersBulletinBoard/installBulletinBoard',
        method: 'get',
    })
}

// 总公司-商务数据看板-装饰看板
export function getDecorationBulletinBoard() {
    return request({
        url: faceApiUrl + '/headquartersBulletinBoard/decorationBulletinBoard',
        method: 'get',
    })
}
// 项目看板-成本计划看板-当期数据统计表
export function  getXmCurrentPeriodStatistics(data) {
    return request({
        url: faceApiUrl + '/projectBulletinBoard/currentPeriodStatistics?projectId='+data.id,
        method: 'get',
    })
}
// 项目看板-成本计划看板-已完成节点数据统计表
export function getXmCompleteNodeStatistics(data) {
    return request({
        url: faceApiUrl + '/projectBulletinBoard/completeNodeStatistics?projectId='+data.id,
        method: 'get',
    })
}
// 项目看板-成本计划看板-总成本折现对比图
export function getXmCostContrast(data) {
    return request({
        url: faceApiUrl + '/projectBulletinBoard/costContrast?projectId='+data.id+'&'+'type=' +data.type,
        method: 'get',
    })
}
// 分公司看板-成本计划看板-当期数据统计表
export function getFgsCurrentPeriodStatistics(data) {
    return request({
        url: faceApiUrl + '/branchCompanyBulletinBoard/currentPeriodStatistics?branchCompanyId='+data.id,
        method: 'get',
    })
}
// 分公司看板-成本计划看板-已完成节点数据统计表
export function getFgsCompleteNodeStatistics(data) {
    return request({
        url: faceApiUrl + '/branchCompanyBulletinBoard/completeNodeStatistics?branchCompanyId='+data.id,
        method: 'get',
    })
}
// 分公司看板-成本计划看板-总成本折现对比图
export function getFgsCostContrast(data) {
    return request({
        url: faceApiUrl + '/branchCompanyBulletinBoard/costContrast?branchCompanyId='+data.id + '&' +'type='  +data.type,
        method: 'get',
    })
}
// 分公司看板-商务数据看板-通用看版
export function getFgsCommonBulletinBoard(data) {
    return request({
        url: faceApiUrl + '/branchCompanyBulletinBoard/commonBulletinBoard?branchCompanyId='+data.id,
        method: 'get',
    })
}

// 分公司看板-商务数据看板-土建看版
export function getFgsCivilEngineeringBulletinBoard(data) {
    return request({
        url: faceApiUrl + '/branchCompanyBulletinBoard/civilEngineeringBulletinBoard?branchCompanyId='+data.id,
        method: 'get',
    })
}
// 分公司看板-商务数据看板-安装看版
export function getFgsInstallBulletinBoard(data) {
    return request({
        url: faceApiUrl + '/branchCompanyBulletinBoard/installBulletinBoard?branchCompanyId=' + data.id,
        method: 'get',
    })
}

// 分公司看板-商务数据看板-装饰看板
export function getFgsDecorationBulletinBoard(data) {
    return request({
        url: faceApiUrl + '/branchCompanyBulletinBoard/decorationBulletinBoard?branchCompanyId='+data.id,
        method: 'get',
    })
}